clear
matrix drop _all
capture log close

log using "suicide-1816-restat-final.log", replace

set matsize 800
set more off
set rmsg on


use "suicide-data-1816-restat.dta", clear


global demog "f_pop1816_under15 f_pop1816_over60 f_urban1816"
global econ  "buil1816_publ_pc"
global educ  "edu1816_pri_enrol_i"
global other "f_dead1816_1821_facc_all_pc"

/***************************************************/
/* Table A.8: Descriptive Statistics, Prussia 1816 */
/***************************************************/

# delimit ;

global summvars "f_dead1816_1821_suic_all_pc f_dead1816_1821_suic_m_pc f_dead1816_1821_suic_f_pc f_dead1816_1821_suic_all_pd 
f_rel1816_prot kmwittenberg $demog $econ $educ f_dead1816_1821_facc_all_pc f_dead1816_1821_facc_all_pd";

# delimit cr

sum $summvars


/***********************************************************************/
/* Table A.9: Protestantism and Suicide in Prussia 1816: OLS Estimates */
/***********************************************************************/

regress f_dead1816_1821_suic_all_pc f_rel1816_prot, robust
regress f_dead1816_1821_suic_m_pc   f_rel1816_prot, robust
regress f_dead1816_1821_suic_f_pc   f_rel1816_prot, robust
regress f_dead1816_1821_suic_all_pc f_rel1816_prot	$demog $econ $educ, robust
regress f_dead1816_1821_suic_m_pc   f_rel1816_prot	$demog $econ $educ, robust
regress f_dead1816_1821_suic_f_pc   f_rel1816_prot	$demog $econ $educ, robust


/********************************************************************/
/* Table 4: Protestantism and Suicide in Prussia 1816: IV Estimates */
/********************************************************************/

/* IV 1st stage */
regress f_rel1816_prot  kmwittenberg  $demog $econ $educ, robust

/* IV 2nd stage */
ivreg2 f_dead1816_1821_suic_all_pc  (f_rel1816_prot=kmwittenberg) $demog $econ $educ, robust
ivreg2 f_dead1816_1821_suic_all_pc  (f_rel1816_prot=kmwittenberg) $demog $econ $educ $other, robust
ivreg2 f_dead1816_1821_suic_m_pc    (f_rel1816_prot=kmwittenberg) $demog $econ $educ $other, robust
ivreg2 f_dead1816_1821_suic_f_pc    (f_rel1816_prot=kmwittenberg) $demog $econ $educ $other, robust
ivreg2 f_dead1816_1821_suic_all_pd  (f_rel1816_prot=kmwittenberg) $demog $econ $educ $other, robust


/**********************************************************************************************************/
/**********************************************************************************************************/



log close


